//
//  PlyerManger.h
//  SBPlayer
//
//  Created by 黄锋 on 15/8/17.
//  Copyright (c) 2015年 lanou. All rights reserved.
//

#import <MediaPlayer/MediaPlayer.h>

#import "BSListModel.h"

#import "BSVoiceCell.h"
typedef NS_ENUM(NSInteger, MediaType) {
    Vedio,
    Song
};

typedef void(^PlayBlock)(void);

@interface PlayerManger : MPMoviePlayerController

@property (strong, nonatomic)BSListModel *currentModel;//记录当前Model
@property (strong, nonatomic)BSVoiceCell *currentCell;
@property (assign, nonatomic)MediaType mediaType;//记录当前播放媒体类型
@property (strong, nonatomic)NSIndexPath *indexPath;//记录当前播放的是那一个cell
@property (nonatomic, copy)PlayBlock startBlock;
@property (nonatomic, copy)PlayBlock finishBlock;
@property(nonatomic, strong) UIView *songView; //歌曲的话,只需添加这个view

+ (instancetype)defaultManger;

- (void)playWithURL:(NSString *)url frame:(CGRect)rect mediaType:(MediaType)mediaType;

- (void)loadWithUrl:(NSString *)urlStr;  //下载视频

- (void)saveImageWithUrl:(NSString *)urlStr;  //保存图片

@end
